﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/Site.Master" AutoEventWireup="true" CodeBehind="profit.aspx.cs" Inherits="聚欣订单分析.OrderAna.profit" %>

<%@ Register Assembly="DevExpress.Web.v18.1, Version=18.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_NAV" runat="server">
    <h2>订单毛利</h2>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_Contents" runat="server">
    <div class="content-page">
            <dx:ASPxGridView ID="ASPxGridView1" runat="server" KeyFieldName="ID" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" OnRowValidating="ASPxGridView1_RowValidating" Width="100%">
                <SettingsAdaptivity>
                    <AdaptiveDetailLayoutProperties ColCount="1"></AdaptiveDetailLayoutProperties>
                </SettingsAdaptivity>
                <Settings ShowGroupPanel="true" ShowHorizontalScrollBar="true" ShowFilterRow="true"
                    ShowFilterRowMenu="true" ShowFilterBar="Visible" ShowFooter="True" />
                <EditFormLayoutProperties ColCount="1"></EditFormLayoutProperties>
                <Columns>
                    <dx:GridViewDataTextColumn FieldName="年份" VisibleIndex="0">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="订单月" Width="60px" VisibleIndex="1">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="订单号" VisibleIndex="1">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="省" VisibleIndex="2">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="地市" VisibleIndex="3">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="运营商" Width="300px" VisibleIndex="4">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="项目" Width="200px" VisibleIndex="5">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="类型" VisibleIndex="6">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="订单金额" VisibleIndex="7">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="开票金额" VisibleIndex="8">
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataTextColumn FieldName="相差" VisibleIndex="11">
                        <EditFormSettings Visible="False" />
                    </dx:GridViewDataTextColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="税点" VisibleIndex="12">
                        <PropertiesSpinEdit DisplayFormatString="0.00">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="除税金额" VisibleIndex="13">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="应付佣金" VisibleIndex="14">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataDateColumn FieldName="支付日期" VisibleIndex="15">
                    </dx:GridViewDataDateColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="实付佣金" VisibleIndex="16">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="无票" VisibleIndex="17">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="普票" VisibleIndex="18">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn Caption="3%" FieldName="三" VisibleIndex="19">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn Caption="6%" FieldName="六" VisibleIndex="20">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="自研软件" VisibleIndex="21">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn Caption="13%" FieldName="十三" VisibleIndex="22">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn Caption="16%" FieldName="十六" VisibleIndex="23">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="除税成本" VisibleIndex="24">
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="报表除税毛利" VisibleIndex="25">
                        <EditFormSettings Visible="False" />
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                    <dx:GridViewDataSpinEditColumn FieldName="市场含税毛利" VisibleIndex="26">
                        <EditFormSettings Visible="False" />
                        <PropertiesSpinEdit DisplayFormatString="{0:N}">
                        </PropertiesSpinEdit>
                    </dx:GridViewDataSpinEditColumn>
                </Columns>
                <TotalSummary>
                    <dx:ASPxSummaryItem FieldName="订单金额" SummaryType="Sum" DisplayFormat="{0:N}" />
                    <dx:ASPxSummaryItem FieldName="除税成本" SummaryType="Sum" DisplayFormat="{0:N}" />
                    <dx:ASPxSummaryItem FieldName="报表除税毛利" SummaryType="Sum" DisplayFormat="{0:N}" />
                    <dx:ASPxSummaryItem FieldName="市场含税毛利" SummaryType="Sum" DisplayFormat="{0:N}" />
                </TotalSummary>
                <SettingsEditing Mode="Batch"></SettingsEditing>
                <SettingsPager PageSize="10">
                </SettingsPager>
            </dx:ASPxGridView>
            <table>
                <tr>
                    <td>
                        <dx:ASPxButton ID="btnExcel" runat="server" Text="导出Excel" OnClick="btnExcel_Click">
                            <Image Url="~/images/ICON/Excel.gif">
                            </Image>
                        </dx:ASPxButton>
                    </td>
                </tr>
            </table>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:JXDDConnectionString %>" SelectCommand="SELECT *,MONTH(订单日期) as 订单月,[订单金额]-[开票金额] as [相差] FROM [v_lrb] where 年份>=2020" UpdateCommand="select AVG(1)"></asp:SqlDataSource>
            <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" GridViewID="ASPxGridView1" runat="server"></dx:ASPxGridViewExporter>
        </div>
</asp:Content>
